<template>
  <div class="container">
    <h1>登录</h1>
    <input type="text" v-model="username" placeholder="请输入账号">
    <input type="password" v-model="password" placeholder="请输入密码">
    <button @click="login">登录</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: '',
      password: ''
    };
  },
  methods: {
    login() {
      if (this.username === 'admin' && this.password === '123456') {
        alert('登录成功');
        // 可以在这里进行页面跳转或其他操作
      } else {
        alert('账号或密码错误');
      }
    }
  }
};
</script>

<style scoped>
.container {
  margin: 20px;
}
</style>